/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package compilador.arquivo;

import compilador.analisador.Lexico;
import compilador.analisador.Sintatico;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 *
 * @author Gustavo
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws FileNotFoundException, IOException {
        // TODO code application logic here
        System.out.println("Digite o nome do arquivo fonte:");
        BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
        String fonte=in.readLine();
        Lexico lex=new Lexico();
        boolean boo=lex.analiseLexica(fonte);
        //lex.mostraTokens();
        lex.verificaErrosLexicos();
        Sintatico sint=new Sintatico(lex.getTokens());
        sint.descricaoRegular();
        //sint.mostraVariaveis();
    }
}
